package guitest03;

import javax.swing.UIManager.*;
import javax.swing.*;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import java.awt.event.*;
import java.awt.*;

public final class Gui extends JFrame
        implements ActionListener {

    JDesktopPane desktop;
    String uNameTextField;
    JLabel welcomeName;
    String pWrdTextField;

    public Gui() {

        super("CSI Salt Lake 4.0");
        try {
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
        }
        setUndecorated(true);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds(0, 0, screenSize.width, screenSize.height);

        desktop = new JDesktopPane();

        createTestP();

        setContentPane(desktop);
        desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);

    }

    //create the HOME Page and listen to actions
    protected void createTestP() {
        PersonFrame homePanel = new PersonFrame();
        homePanel.setLayout(null);
        homePanel.setVisible(true);
        desktop.add(homePanel);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
